using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Drawing;

namespace QuickLaunch
{
    [ComVisibleAttribute(false),
         System.Security.SuppressUnmanagedCodeSecurity()]
    public class WinAPI
    {
        [DllImport("user32.dll")]
        public static extern int ShowCursor(bool bShow);

        [DllImport("user32.dll")]
        public static extern bool SetCursorPos(int X, int Y);

        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool SetForegroundWindow(IntPtr hWnd);

        [DllImport("user32.dll")]
        [return: MarshalAs(UnmanagedType.Bool)]
        public static extern bool GetCursorPos(out Point lpPoint);

        public static Point GetCursorPos()
        {
            Point p;
            GetCursorPos(out p);
            return p;
        }
    }
}
